package com.wing.user.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wing.common.utils.JsonResult;
import com.wing.user.model.entity.Department;
import com.wing.user.model.request.DepartmentForm;
import com.wing.user.model.response.DepartmentVO;
import com.wing.web.excel.DepartmentExcelIn;
import com.wing.web.excel.UseInventoryUserExcelIn;

import java.util.List;
import java.util.Map;

/**
 * 部门架构-Service
 *
 * @author
 */
public interface DepartmentService extends IService<Department> {

    /**
     * 添加
     *
     * @param departmentForm
     * @return
     */
    int add(DepartmentForm departmentForm);

    /**
     * 修改
     *
     * @param department
     * @return
     */
    boolean update(Department department);

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<DepartmentVO> list4app(Map<String, Object> params);

    /**
     * 分页list-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    Page<DepartmentVO> pageList4app(Page page, Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    DepartmentVO get4appById(Long id);

    /**
     * 删除部门
     * @param departmentId
     * @return
     */
    boolean delete(Long departmentId);

    /**
     * 导入
     * @param list
     */
    void importExcel(List<DepartmentExcelIn> list);

    /**
     * 导出
     * @param params
     * @return
     */
    List<DepartmentExcelIn> exportList(Map<String, Object> params);

    JsonResult getTreeData(Long companyId);

    List<DepartmentVO> getDeptTree();
}
